home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / filestuf.lzh / FILESTUF.CMD < prev    next >
OS/2 REXX Batch file  |  1990-08-22  |  3KB  |  81 lines

  1. hirez 1  -- start the script if we're in high rez
  2. medrez 1 -- likewise for medium rez
  3. ;
  4. ;We'll exit if the ST is in low rez, since we need 80 columns!
  5. ;
  6. s Your ST is currently in LOW REZ. The
  7. s example scripts are designed to use
  8. s all 80 columns, so please switch to
  9. s either medium or high rez and rerun
  10. s Filestuff. Thanks!
  11. s
  12. s press any key to continue...
  13. b
  14. p 30
  15. b
  16. quit
  17. ;
  18. ;------------------------------
  19. ;
  20. @ 1
  21. s
  22. s There are some example scripts (named EX*.CMD) included in the Filestuff
  23. s ARC. The scripts demonstrate most of the Filestuff commands. It doesn't
  24. s take very long to run the examples, so we'll give you a chance to run them
  25. s now. All you need to do is make sure all the files from the ARC are in the
  26. s root directory of your disk. Also, since the file command examples will
  27. s write to your disk, make sure there's a little bit of free space available.
  28. s
  29. s (There's a 30-second pause here; press any key to continue sooner. These
  30. s example scripts use frequent pauses so that you can read what's on the
  31. s screen... if you get tired of waiting, just hit a key to continue.)
  32. b
  33. p 30  --  PAUSE here so we can read the paragraph above
  34. s
  35. s It's probably easiest to run these from a ramdisk, but it's not necessary.
  36. s At any rate, even if you don't run the examples now, be sure to look over
  37. s the scripts to see how things are done.
  38. s
  39. s
  40. ;Note: in the SHOW command below, I've embedded the esc-p and esc-q
  41. ;commands that turn reverse video on and off to highlight the proper
  42. ;key to press. Depending on the editor you're using to look at this
  43. ;script, you may not be able to see the ESC characters. One reason I
  44. ;recommend Flash is that its editor _will_ display control characters.
  45. ;
  46. s If you'd like to see the examples now, press the p space bar q within
  47. s 30 seconds. Otherwise, press any other key (or no key at all).
  48. s
  49. ;
  50. ;Here's the real stuff. Note the Buffer commands before getting keyboard
  51. ;input and before exiting the script - it's usually a good idea to use
  52. ;Buffer in both circumstances! Anyway...
  53. ;
  54. b         BUFFER clears old keypresses before asking for input
  55. p 30      PAUSE for up to 30 seconds
  56. k         KEYGET gets a keypress if one is ready
  57. i /s 9    IFKEY jumps if a keypress matches
  58. ;If there's any other keypress (or none at all), we'll just quit here.
  59. b         BUFFER clears the key buffer before exiting
  60. q         QUIT ends the program
  61. @ 9       this is a LABEL
  62. s Ok, we'll Transfer control to our first example script. Since we
  63. s haven't turned off the file-command Echo, the entire command line for
  64. s the Transfer will be displayed. Then the new script will be read in
  65. s and executed. (We'll pause briefly now so you can read this message.)
  66. s
  67. p 10
  68. b
  69. t \example.cmd  --  TRANSFER control to our first example script...
  70. s
  71. v +  --  turns on reverse video for the error message!
  72. s ◆If you see this line, then the Transfer command failed. The most likely 
  73. s cause of this is that Filestuff couldn't find the new script. Since we  
  74. s specified "\example.cmd", Filestuff is looking in the root directory of 
  75. s the default disk (the disk from which you ran Filestuff). Move all the  
  76. s supplied .CMD files into the root directory and run Filestuff again!    
  77. s
  78. v -
  79. p 30
  80. b
  81.